#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Constraint.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ValueSpecification;

/// <summary>
/// InteractionConstraint
/// An InteractionConstraint is a Boolean expression that guards an operand in a
/// CombinedFragment.
/// </summary>
class UMLMODEL_EXPORT InteractionConstraint : public Constraint {

public: // Constructors and destructors
    explicit InteractionConstraint(const QString& umlType="uml::InteractionConstraint");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// maxint getter
    /// The maximum number of iterations of a loop
    /// </summary>
    shared_ptr<ValueSpecification> maxint() const;

    /// <summary>
    /// maxint setter
    /// The maximum number of iterations of a loop
    /// </summary>
    void setMaxint(shared_ptr<ValueSpecification> value);

    /// <summary>
    /// minint getter
    /// The minimum number of iterations of a loop
    /// </summary>
    shared_ptr<ValueSpecification> minint() const;

    /// <summary>
    /// minint setter
    /// The minimum number of iterations of a loop
    /// </summary>
    void setMinint(shared_ptr<ValueSpecification> value);

private: // Fields
    /// <summary>
    /// maxint
    /// The maximum number of iterations of a loop
    /// </summary>
    shared_ptr<ValueSpecification> maxint_;

    /// <summary>
    /// minint
    /// The minimum number of iterations of a loop
    /// </summary>
    shared_ptr<ValueSpecification> minint_;

};

} // namespace uml
